//
//  HomePageController.m
//  CookGuest
//
//  Created by dllo on 15/9/11.
//  Copyright (c) 2015年 杨元石. All rights reserved.
//

#import "HomePageController.h"
#import "LeftSlideViewController.h"
#import "AppDelegate.h"
@interface HomePageController ()

@end

@implementation HomePageController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIBarButtonItem *kk = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"caidan.png"] style:UIBarButtonItemStyleDone target:self action:@selector(chouti)];
    self.navigationItem.leftBarButtonItem = kk;

    
    // Do any additional setup after loading the view.
}
- (void)chouti
{
    // 通过app 回到主Window用来显示抽屉的VC
    AppDelegate *tempAppDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
    // 由关闭状态打开抽屉
    if (tempAppDelegate.leftVc.closed)
    {
        [tempAppDelegate.leftVc openLeftView];
    }
    // 关闭抽屉
    else
    {
        [tempAppDelegate.leftVc closeLeftView];
    }
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
